package com.qk.management.handler;

import com.qk.common.Result;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.ExceptionHandler;
import org.springframework.web.bind.annotation.RestControllerAdvice;

/**
 * @author Just、倾城
 * @date 2025-10-07
 * @Description no
 * @Version 1.0
 */
@Slf4j
@RestControllerAdvice
public class MyGlobalExceptionHandler {
    @ExceptionHandler(value = Exception.class)
    public Result handleException(Exception e) {
        log.error("系统异常", e);
        return Result.error("您的网络有问题,请稍后重试！");
    }
}
